<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="<%=path %>/images/style.css" rel="stylesheet" type="text/css" />
    <c:if test="${sessionScope.userType!=null && sessionScope.userType==2}">
      <!--用户登录后才显示-->
      
      <script language="javascript">  
           
        
        //本次累计时间
        <!--
    var maxtime1;
    if (window.name == '') {
        maxtime1 = 0;
    } else {
        maxtime1 = window.name;
    }
    function CountDown1() {
        //if (maxtime1 >= 0) {
            minutes1 = Math.floor(maxtime1 / 60);
            seconds1 = Math.floor(maxtime1 % 60);
            msg1 = "已经考试时间:" + minutes1 + "分" + seconds1 + "秒";
            document.all["timerall"].innerHTML = msg1;
            //document.all["timerall11"].innerHTML = (minutes1*60+seconds1)/3600;    <!--换算为小时后台用-->
            //document.getElementById("timerall1").value=(minutes1*60+seconds1)/3600;
           ++maxtime1;
            window.name = maxtime1;
       // }
        
    }
    timerend = setInterval("CountDown1()", 1000); 


//--> 



   
		</script>
      <script language="javascript">
        // 自动保存时间

        //alert(maxtime111);

       //maxtime 自动保存时间 单位秒
        function countDown2(maxtime111, fn) {
            var timer = setInterval(function() {
                if (maxtime111 >= 0) {
                    minutes = Math.floor(maxtime111 / 60);
                    seconds = Math.floor(maxtime111 % 60);
                    msg = "距离自动交卷还有" + minutes + "分" + seconds + "秒";
                    fn(msg);
                    --maxtime111;
                }
                else {


                    clearInterval(timer);
                    document.getElementById('Ibtn_save').click();

                    countDown2(6, function(msg) {
                    document.getElementById('timerend').innerHTML = msg;
                    });

                }
            }, 1000);
        }




         var maxtime111  //自动保存时间
    if (window.name == '') {
        maxtime111 = 120;
    } else {
        maxtime111 = 120-window.name;
    }

        //countDown2(300, function(msg)
        countDown2(maxtime111,function( msg ) 
        {
            document.getElementById('timerend').innerHTML = msg;
        }); 

      

   
    </script>
    </c:if>
</head>
<body>

<!--main start -->

<div id="main">
  <jsp:include flush="true" page="/qiantai/inc/incTop2.jsp"></jsp:include>
  
  <!--left panel start -->
  <div id="left">
    <jsp:include flush="true" page="/qiantai/inc/incLeft.jsp"></jsp:include>
  </div>
  <!--left panel end --> 
  <!--right panel start -->
  <div id="right"> 
    <!--rightBotMain start -->
    
    <div class="contactMain"> 
      
      <!--best start --> 
      <!--rightBot start --> 
      <!--rightBot end --> 
      <!--best start -->
      <div id="best1">
        <h2><span>在线考试 </span></h2>
        <table align="left">
          <tr>
            <td width="12"></td>
            <td><form action="<%=path %>/timu?type=timuSuiji_defen" name="" method="post">
                <input type="hidden" name="istest" value="考试">
                <input type="hidden" name="kecheng_id" value="${sessionScope.kecheng_id}">




            <div id="timerend" style="color:red">&nbsp;</div>
            <!--考试时间保存时间-->
            
            <div id="timerall" style="color:red">&nbsp;</div>
            <!--本次累计时间-->
       

               <br><strong>1、单选题 共45分，90个题目，每题0.5分</strong>
               <c:forEach items="${sessionScope.timuList1}"  varStatus="sta" var="timu">
                  <table cellspacing="1" cellpadding="1">
                    <tr>
                      <td> ${sta.index+1 }：${timu.name }(<font color="red">${timu.fenshu }分</font>)
                        &nbsp;&nbsp;&nbsp; </td>
                    </tr>
                    <tr>
                      <td align="left"> A:
                        <input type="radio" name="${timu.id}" value="A" style="border: 0"/>
                        ${timu.xuanxianga }<br/>
                        B:
                        <input type="radio" name="${timu.id}" value="B" style="border: 0"/>
                        ${timu.xuanxiangb }<br/>
                        C:
                        <input type="radio" name="${timu.id}" value="C" style="border: 0"/>
                        ${timu.xuanxiangc }<br/>
                        D:
                        <input type="radio" name="${timu.id}" value="D" style="border: 0"/>
                        ${timu.xuanxiangd }<br/></td>
                    </tr>
                  </table>
                  <br/>
                </c:forEach>





               <br><strong>2、多选题 共40分，40个题目，每题1分</strong>
               <c:forEach items="${sessionScope.timuList2}"  varStatus="sta" var="timu">
                  <table cellspacing="1" cellpadding="1">
                    <tr>
                      <td> ${sta.index+1 }：${timu.name }(<font color="red">${timu.fenshu }分</font>)
                        &nbsp;&nbsp;&nbsp; </td>
                    </tr>
                    <tr>
                      <td align="left"> A:
                        <input type="checkbox" name="${timu.id}" value="A" style="border: 0"/>
                        ${timu.xuanxianga }<br/>
                        B:
                        <input type="checkbox" name="${timu.id}" value="B" style="border: 0"/>
                        ${timu.xuanxiangb }<br/>
                        C:
                        <input type="checkbox" name="${timu.id}" value="C" style="border: 0"/>
                        ${timu.xuanxiangc }<br/>
                        D:
                        <input type="checkbox" name="${timu.id}" value="D" style="border: 0"/>
                        ${timu.xuanxiangd }<br/></td>
                    </tr>
                  </table>
                  <br/>
                </c:forEach>

               <br><strong>3、判断题 共15分，15个题目，每题1分</strong>
               <c:forEach items="${sessionScope.timuList3}"  varStatus="sta" var="timu">
                  <table cellspacing="1" cellpadding="1">
                    <tr>
                      <td> ${sta.index+1 }：${timu.name }(<font color="red">${timu.fenshu }分</font>)
                        &nbsp;&nbsp;&nbsp; </td>
                    </tr>
                    <tr>
                      <td align="left"> 
                        <input type="radio" name="${timu.id}" value="正确" style="border: 0"/>
                        正确     &nbsp;&nbsp;&nbsp;&nbsp;
                        
                        <input type="radio" name="${timu.id}" value="错误" style="border: 0"/>
                        错误<br/>
                        </td>
                    </tr>
                  </table>
                  <br/>
                </c:forEach>

                <input type="submit" id="Ibtn_save" value="提交"/>
              </form></td>
          </tr>
        </table>
        <br class="spacer" />
      </div>
      <!--best end --> 
    </div>
    <!--rightBotMain end --> 
    <!--last panel start --> 
    <!--last panel end --> 
    <br class="spacer" />
  </div>
  
  <!--right panel end --> 
  <br class="spacer" />
</div>
<!--main end --> 
<!--footerMain start -->

<jsp:include flush="true" page="/qiantai/inc/incFoot.jsp"></jsp:include>

<!--footerMain end -->
</body>
</html>
